document.write("<script language='javascript' src='../js/method/des.js'></script>");
function getTime(){
    var getDate = 'saywash#'+(new Date()).valueOf();
    return strEnc(getDate,'hlF#$1x)','hlG#$2x)','hlH#$3x)');
}
function getWashUrl(){
    return 'http://203.187.186.136:40000/saywashnew/WashCallApi';
}
function getMarketUrl(){
    return 'http://192.168.1.249:8088/MarketApi';
}
// 获取顶层地址
function getMarketUrlTwo(){
    return 'http://192.168.1.249:8088';
}
function getAliUrl(){
    return 'https://tcc.taobao.com/cc/json/mobile_tel_segment.htm';
}
//获取url的参数
function getUrlParam(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
    var r = window.location.search.substr(1).match(reg);  //匹配目标参数
    if (r != null) return decodeURI(r[2]); return null; //返回参数值
}

//app调用
function istoken(url,istokeid){
    var u = navigator.userAgent;
    var isAndroid = u.indexOf('Android') > -1; //android终端
    var isdiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
    if(isdiOS){
        /*function sendLoginCommand(){ var url1=""+url+"::"+istokeid+""; document.location = url1;}
        sendLoginCommand();*/
        //旧版本
        function connectWebViewJavascriptBridge(callback) {
            if (window.WebViewJavascriptBridge) {
                callback(WebViewJavascriptBridge)
            } else {
                document.addEventListener('WebViewJavascriptBridgeReady', function() {
                    callback(WebViewJavascriptBridge)
                }, false)
            }
        }

        connectWebViewJavascriptBridge(function(bridge) {
            bridge.init(function(message, responseCallback) {
                alert('Received message: ' + message)
                if (responseCallback) {
                    responseCallback("Right back atcha")
                }
            });
            bridge.send({"url":url,"typeid":istokeid});
            bridge.send('Please respond to this', function responseCallback(responseData) {
                console.log("Javascript got its response", responseData)
            })
        });


        //新版本
        function iosLogin(){
            window.webkit.messageHandlers.JS_Call_OC_login.postMessage({"url":url,"typeid":istokeid});
        }
        iosLogin();


    }
    if(isAndroid){
        //alert(url);
        function showAndroidToast()
        {
            javascript:Android.login("3",url,istokeid);
        }
        showAndroidToast();
    }
}

